import socket

des_ip = '192.168.124.11'
des_por = 8080

def main():
    s = socket.socket(socket.AF_INET,socket.SOCK_DGRAM)
    while True:
        content =input('请输入要发送的内容(输入Q退出):')
        if content !='Q':
            s.sendto(content.encode('gbk'),(des_ip,des_por))
        else:
            break
    s.close()

if __name__=='__main__':
    main()
